<%--
  Created by IntelliJ IDEA.
  User: asus
  Date: 2019/12/15
  Time: 22:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <jsp:useBean id="myUsers" class="com.po.Users" scope="page"></jsp:useBean>
    <jsp:useBean id="userdao" class="com.dao.UserDao" scope="page"></jsp:useBean>

    <jsp:setProperty name="myUsers" property="*" ></jsp:setProperty>
    <%
       if(userdao.getLogin(myUsers)){
           session.setAttribute("username",myUsers.getUserName());
           out.print("欢迎"+session.getAttribute("username"));
       }else {
           out.print("请重新登录");
       }
      %>
</body>
</html>
